package hn.cch.mybatis.boot.mapper;

import hn.cch.mybatis.boot.entity.TableEntity;
import hn.cch.mybatis.boot.provider.ProviderMethodResolverImpl;
import hn.cch.mybatis.boot.provider.SourceProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

@Mapper
public interface ProviderMapper {

    @SelectProvider(value = SourceProvider.class, method = "selectTable")
    public List<TableEntity> selectTable(@Param(value = "tableColumn") String tableColumn,
                                         @Param(value = "orderColumn") String orderColumn);

    @SelectProvider(value = ProviderMethodResolverImpl.class)
    public List<TableEntity> providerMethod(@Param(value = "tableColumn") String tableColumn,
                                            @Param(value = "orderColumn") String orderColumn);

    // @SelectProvider
    // // @SelectProvider(value = DefaultProvider.class)
    // public List<TableEntity> defaultProvider(@Param(value = "tableColumn") String tableColumn,
    //                                          @Param(value = "orderColumn") String orderColumn);

}
